package com.example.demo.service.impl;

import com.example.demo.dao.GoodsMapper;
import com.example.demo.service.GoodsService;
import com.example.demo.vo.Goods;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {

    //依赖注入
    @Autowired
    GoodsMapper goodsMapper;

    @Override
    public List<Goods> findGoodsList(Goods goods) {
        List<Goods> goodsList = goodsMapper.findGoodsList(goods);
        return goodsList;
    }

    @Override
    public List<Goods> findGoodsListPage(Goods goods, PageInfo page) {
        return null;
    }

    @Override
    public void insert(Goods goods) {
        goodsMapper.insert(goods);
    }
}
